package com.ruoyi.apis.controller;

import com.ruoyi.apis.dto.AdMessageDTO;
import com.ruoyi.apis.dto.ProjectMessageDTO;
import com.ruoyi.apis.service.MessageService;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Choi
 * @Date 2021/8/17
 */

@Api(value = "落地页留言", tags = "落地页相关接口")
@RestController
@RequestMapping("/api")
public class AMessageController {

    @Autowired
    private MessageService messageService;

    /**
     * 落地页发布留言
     */
    @ApiOperation(value = "落地页发布留言")
    @PostMapping("/ad/message")
    public AjaxResult createMessage(@RequestBody @Validated AdMessageDTO messageDTO) {
        messageService.createAdMessage(messageDTO);
        return AjaxResult.success();
    }
}
